Developer Documentation

QuickTime 4 API Documentation

3D Graphics Programming with QuickDraw 3D 1.5.4

Previous | QD3D Book | Overview | Chapter Contents | Next |

Managing Matrices

QuickDraw 3D provides routines that you can use to perform standard operations on 3-by-3 and 4-by-4 matrices. Each routine performs some operation on one or more source matrices and returns a pointer to the destination matrix in the result parameter. Any of the source or destination matrices may be the same matrix. The source matrices are unchanged, unless one of them is also specified as the destination matrix.

Q3Matrix3x3_Copy

You can use the Q3Matrix3x3_Copy function to get a copy of a 3-by-3 matrix.

TQ3Matrix3x3 *Q3Matrix3x3_Copy (
                     const TQ3Matrix3x3 *matrix3x3,
                     TQ3Matrix3x3 *result);
matrix3x3
A 3-by-3 matrix.
result
On exit, a copy of matrix3x3 .

DESCRIPTION

The Q3Matrix3x3_Copy function returns, as its function result and in the result parameter, a copy of the matrix matrix3x3 .

Q3Matrix4x4_Copy

You can use the Q3Matrix4x4_Copy function to get a copy of a 4-by-4 matrix.

TQ3Matrix4x4 *Q3Matrix4x4_Copy (
                     const TQ3Matrix4x4 *matrix4x4,
                     TQ3Matrix4x4 *result);
matrix4x4
A 4-by-4 matrix.
result
On exit, a copy of matrix4x4 .

DESCRIPTION

The Q3Matrix4x4_Copy function returns, as its function result and in the result parameter, a copy of the matrix matrix4x4 .

Q3Matrix3x3_SetIdentity

You can use the Q3Matrix3x3_SetIdentity function to set a 3-by-3 matrix to the identity matrix.

TQ3Matrix3x3 *Q3Matrix3x3_SetIdentity (TQ3Matrix3x3 *matrix3x3);
matrix3x3
On exit, the 3-by-3 identity matrix.

DESCRIPTION

The Q3Matrix3x3_SetIdentity function returns, as its function result and in the matrix3x3 parameter, the 3-by-3 identity matrix.

Q3Matrix4x4_SetIdentity

You can use the Q3Matrix4x4_SetIdentity function to set a 4-by-4 matrix to the identity matrix.

TQ3Matrix4x4 *Q3Matrix4x4_SetIdentity (TQ3Matrix4x4 *matrix4x4);
matrix4x4
On exit, the 4-by-4 identity matrix.

DESCRIPTION

The Q3Matrix4x4_SetIdentity function returns, as its function result and in the matrix4x4 parameter, the 4-by-4 identity matrix.

Q3Matrix3x3_Transpose

You can use the Q3Matrix3x3_Transpose function to transpose a 3-by-3 matrix.

TQ3Matrix3x3 *Q3Matrix3x3_Transpose (
                     const TQ3Matrix3x3 *matrix3x3,
                     TQ3Matrix3x3 *result);
matrix3x3
A 3-by-3 matrix.
result
On exit, the transpose of matrix3x3 .

DESCRIPTION

The Q3Matrix3x3_Transpose function returns, as its function result and in the result parameter, the transpose of the matrix matrix3x3 .

Q3Matrix4x4_Transpose

You can use the Q3Matrix4x4_Transpose function to transpose a 4-by-4 matrix.

TQ3Matrix4x4 *Q3Matrix4x4_Transpose (
                     const TQ3Matrix4x4 *matrix4x4,
                     TQ3Matrix4x4 *result);
matrix4x4
A 4-by-4 matrix.
result
On exit, the transpose of matrix4x4 .

DESCRIPTION

The Q3Matrix4x4_Transpose function returns, as its function result and in the result parameter, the transpose of the matrix matrix4x4 .

Q3Matrix3x3_Invert

You can use the Q3Matrix3x3_Invert function to invert a 3-by-3 matrix.

TQ3Matrix3x3 *Q3Matrix3x3_Invert (
                     const TQ3Matrix3x3 *matrix3x3,
                     TQ3Matrix3x3 *result);
matrix3x3
A 3-by-3 matrix.
result
On exit, the inverse of matrix3x3 .

DESCRIPTION

The Q3Matrix3x3_Invert function returns, as its function result and in the result parameter, the inverse of the matrix matrix3x3 .

Q3Matrix4x4_Invert

You can use the Q3Matrix4x4_Invert function to invert a 4-by-4 matrix.

TQ3Matrix4x4 *Q3Matrix4x4_Invert (
                     const TQ3Matrix4x4 *matrix4x4,
                     TQ3Matrix4x4 *result);
matrix4x4
A 4-by-4 matrix.
result
On exit, the inverse of matrix4x4 .

DESCRIPTION

The Q3Matrix4x4_Invert function returns, as its function result and in the result parameter, the inverse of the matrix matrix4x4 .

Q3Matrix3x3_Adjoint

You can use the Q3Matrix3x3_Adjoint function to adjoin a 3-by-3 matrix.

TQ3Matrix3x3 *Q3Matrix3x3_Adjoint (
                     const TQ3Matrix3x3 *matrix3x3,
                     TQ3Matrix3x3 *result);
matrix3x3
A 3-by-3 matrix.
result
On exit, the adjoint of matrix3x3 .

DESCRIPTION

The Q3Matrix3x3_Adjoint function returns, as its function result and in the result parameter, the adjoint of the matrix matrix3x3 .

Q3Matrix3x3_Multiply

You can use the Q3Matrix3x3_Multiply function to multiply two 3-by-3 matrices.

TQ3Matrix3x3 *Q3Matrix3x3_Multiply (
                     const TQ3Matrix3x3 *matrixA,
                     const TQ3Matrix3x3 *matrixB,
                     TQ3Matrix3x3 *result);
matrixA
A 3-by-3 matrix.
matrixB
A 3-by-3 matrix.
result
On exit, the product of matrixA and matrixB .

DESCRIPTION

The Q3Matrix3x3_Multiply function returns, as its function result and in the result parameter, the product of the two 3-by-3 matrices matrixA and matrixB .

Q3Matrix4x4_Multiply

You can use the Q3Matrix4x4_Multiply function to multiply two 4-by-4 matrices.

TQ3Matrix4x4 *Q3Matrix4x4_Multiply (
                     const TQ3Matrix4x4 *matrixA,
                     const TQ3Matrix4x4 *matrixB,
                     TQ3Matrix4x4 *result);
matrixA
A 4-by-4 matrix.
matrixB
A 4-by-4 matrix.
result
On exit, the product of matrixA and matrixB .

DESCRIPTION

The Q3Matrix4x4_Multiply function returns, as its function result and in the result parameter, the product of the two 4-by-4 matrices matrixA and matrixB .

Q3Matrix3x3_Determinant

You can use the Q3Matrix3x3_Determinant function to get the determinant of a 3-by-3 matrix.

float Q3Matrix3x3_Determinant (const TQ3Matrix3x3 *matrix3x3);
matrix3x3
A 3-by-3 matrix.

DESCRIPTION

The Q3Matrix3x3_Determinant function returns, as its function result, the determinant of the matrix matrix3x3 .

Q3Matrix4x4_Determinant

You can use the Q3Matrix4x4_Determinant function to get the determinant of a 4-by-4 matrix.

float Q3Matrix4x4_Determinant (const TQ3Matrix4x4 *matrix4x4);
matrix4x4
A 4-by-4 matrix.

DESCRIPTION

The Q3Matrix4x4_Determinant function returns, as its function result, the determinant of the matrix matrix4x4 .


© 1997 Apple Computer, Inc.

Previous | QD3D Book | Overview | Chapter Contents | Next |